<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>QCNSim: QcnSim/Token.cpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">QCNSim
   </div>
   <div id="projectbrief">Simulator for Quake-Catcher Network</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d21be12960473ba5c51e5f9beea3525e.html">QcnSim</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">Token.cpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_token_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_token_8h.html">Token.h</a>&quot;</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;</div>
<div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="class_token.html#a8bf8338e7e065f2a13a51fd7286ec994">   34</a></span>&#160;<a class="code" href="class_token.html#a8bf8338e7e065f2a13a51fd7286ec994">Token::Token</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <span class="keywordtype">id</span>, <span class="keywordtype">int</span> priority, std::shared_ptr&lt;Entity&gt; associatedEntity, std::shared_ptr&lt;Entity&gt; source, std::shared_ptr&lt;Entity&gt; destination): </div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;        id(id), priority(priority), associatedEntity(associatedEntity), source(source), destination(destination), absoluteGenerationTime(<a class="code" href="_token_8h.html#a17a408125f68aec488770e77e17f70ea">DEFAULT_GENERATION_TIME</a>),</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;        recordThisRoute(false) {</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;}</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;</div>
<div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="class_token.html#a2750086d817a19cf445bbf3beb2fbc7a">   53</a></span>&#160;<a class="code" href="class_token.html#a8bf8338e7e065f2a13a51fd7286ec994">Token::Token</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <span class="keywordtype">id</span>, <span class="keywordtype">int</span> priority, std::shared_ptr&lt;Entity&gt; associatedEntity, std::shared_ptr&lt;Entity&gt; source, std::shared_ptr&lt;Entity&gt; destination, std::shared_ptr&lt;Entity&gt; previous, std::shared_ptr&lt;Entity&gt; next): </div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;        id(id), priority(priority), associatedEntity(associatedEntity), source(source), destination(destination), previous(previous), next(next), route(), absoluteGenerationTime(<a class="code" href="_token_8h.html#a17a408125f68aec488770e77e17f70ea">DEFAULT_GENERATION_TIME</a>), </div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;        recordThisRoute(false) {</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;}</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;</div>
<div class="line"><a name="l00070"></a><span class="lineno"><a class="line" href="class_token.html#ae074217cfca237face1c433bf62496d9">   70</a></span>&#160;<a class="code" href="class_token.html#a8bf8338e7e065f2a13a51fd7286ec994">Token::Token</a>(<a class="code" href="class_simulator_globals.html">SimulatorGlobals</a> &amp;simulatorGlobals, <span class="keywordtype">int</span> priority, std::shared_ptr&lt;Entity&gt; associatedEntity, std::shared_ptr&lt;Entity&gt; source, std::shared_ptr&lt;Entity&gt; destination): </div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;        priority(priority), associatedEntity(associatedEntity), source(source), destination(destination), route(), recordThisRoute(false) {</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;    <span class="keywordtype">id</span> = simulatorGlobals.<a class="code" href="class_simulator_globals.html#a139c8820dedfd73eb81e6ded58c0c792">getTokenNextId</a>();</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;    <a class="code" href="class_token.html#ae1697de3383688ddbe8196cb392bf2ac">absoluteGenerationTime</a> = simulatorGlobals.<a class="code" href="class_simulator_globals.html#a08da82e86d7c26d8f2498bd313f0e66e">getCurrentAbsoluteTime</a>();</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;}</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;</div>
<div class="line"><a name="l00090"></a><span class="lineno"><a class="line" href="class_token.html#a650ec39ddda6680a78802727b249bdf3">   90</a></span>&#160;<a class="code" href="class_token.html#a8bf8338e7e065f2a13a51fd7286ec994">Token::Token</a>(<a class="code" href="class_simulator_globals.html">SimulatorGlobals</a> &amp;simulatorGlobals, <span class="keywordtype">int</span> priority, std::shared_ptr&lt;Entity&gt; associatedEntity, std::shared_ptr&lt;Entity&gt; source, std::shared_ptr&lt;Entity&gt; destination, std::shared_ptr&lt;Entity&gt; previous, std::shared_ptr&lt;Entity&gt; next): </div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;        priority(priority), associatedEntity(associatedEntity), source(source), destination(destination), previous(previous), next(next), route(), recordThisRoute(false) {</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;    <span class="keywordtype">id</span> = simulatorGlobals.<a class="code" href="class_simulator_globals.html#a139c8820dedfd73eb81e6ded58c0c792">getTokenNextId</a>();</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;    <a class="code" href="class_token.html#ae1697de3383688ddbe8196cb392bf2ac">absoluteGenerationTime</a> = simulatorGlobals.<a class="code" href="class_simulator_globals.html#a08da82e86d7c26d8f2498bd313f0e66e">getCurrentAbsoluteTime</a>();</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;}</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;</div>
<div class="line"><a name="l00109"></a><span class="lineno"><a class="line" href="class_token.html#a4b3d5c356b5afbd6937197b849293b45">  109</a></span>&#160;<a class="code" href="class_token.html#a8bf8338e7e065f2a13a51fd7286ec994">Token::Token</a>(<a class="code" href="class_simulator_globals.html">SimulatorGlobals</a> &amp;simulatorGlobals, <span class="keywordtype">int</span> priority, std::shared_ptr&lt;Entity&gt; associatedEntity,</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;        std::shared_ptr&lt;Entity&gt; source, std::shared_ptr&lt;Entity&gt; destination, std::vector&lt;std::shared_ptr&lt;Entity&gt;&gt; explicitRoute): </div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;        priority(priority), associatedEntity(associatedEntity), source(source), destination(destination), route(explicitRoute), recordThisRoute(false) {</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;    <span class="keywordtype">id</span> = simulatorGlobals.<a class="code" href="class_simulator_globals.html#a139c8820dedfd73eb81e6ded58c0c792">getTokenNextId</a>();</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;    <a class="code" href="class_token.html#ae1697de3383688ddbe8196cb392bf2ac">absoluteGenerationTime</a> = simulatorGlobals.<a class="code" href="class_simulator_globals.html#a08da82e86d7c26d8f2498bd313f0e66e">getCurrentAbsoluteTime</a>();</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;}</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;</div>
<div class="line"><a name="l00131"></a><span class="lineno"><a class="line" href="class_token.html#a08c7794a798701cde7a870bf5b4bfef9">  131</a></span>&#160;<a class="code" href="class_token.html#a8bf8338e7e065f2a13a51fd7286ec994">Token::Token</a>(<a class="code" href="class_simulator_globals.html">SimulatorGlobals</a> &amp;simulatorGlobals, <span class="keywordtype">int</span> priority, std::shared_ptr&lt;Entity&gt; associatedEntity, std::shared_ptr&lt;Entity&gt; source,</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;        std::shared_ptr&lt;Entity&gt; destination, std::shared_ptr&lt;Entity&gt; previous, std::shared_ptr&lt;Entity&gt; next, std::vector&lt;std::shared_ptr&lt;Entity&gt;&gt; explicitRoute): </div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;        priority(priority), associatedEntity(associatedEntity), source(source), destination(destination), previous(previous), next(next), route(explicitRoute),</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;        recordThisRoute(false) {</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;    <span class="keywordtype">id</span> = simulatorGlobals.<a class="code" href="class_simulator_globals.html#a139c8820dedfd73eb81e6ded58c0c792">getTokenNextId</a>();</div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;    <a class="code" href="class_token.html#ae1697de3383688ddbe8196cb392bf2ac">absoluteGenerationTime</a> = simulatorGlobals.<a class="code" href="class_simulator_globals.html#a08da82e86d7c26d8f2498bd313f0e66e">getCurrentAbsoluteTime</a>();</div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;}</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;</div>
<div class="line"><a name="l00142"></a><span class="lineno"><a class="line" href="class_token.html#a3d7d59eaac1535df1433357d5d372f84">  142</a></span>&#160;<a class="code" href="class_token.html#a3d7d59eaac1535df1433357d5d372f84">Token::~Token</a>() {</div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;}</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;</div>
<div class="line"><a name="l00155"></a><span class="lineno"><a class="line" href="class_token.html#a1251a6a9395ed89aac82e88f4c110335">  155</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_token.html#a1251a6a9395ed89aac82e88f4c110335">Token::setExplicitRoute</a>(std::vector&lt;std::shared_ptr&lt;Entity&gt;&gt; explicitRoute){</div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;    <a class="code" href="class_token.html#a8f73b3dffa8f905bdccb45abbf19aca6">route</a> = <a class="code" href="class_route.html">Route</a>(explicitRoute);</div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;}</div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;</div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;<span class="comment">// * @brief Gets the (reference to) route attached to token.</span></div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;<span class="comment">// *</span></div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;<span class="comment">// * @details </span></div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;<span class="comment">// * Return a reference here is necessary, because other functions might want to modify the Route object within this token, such as</span></div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;<span class="comment">// * routing functions.</span></div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;<span class="comment">// *</span></div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;<span class="comment">// * @return Reference to Route object.</span></div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;<span class="comment">// */</span></div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;<span class="comment">//Route&amp; Token::getRoute() {</span></div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;<span class="comment">//  return route;</span></div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;<span class="comment">//}</span></div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;</div>
<div class="line"><a name="l00177"></a><span class="lineno"><a class="line" href="class_token.html#a56e59f6ff2f7ad073d0456f314c3f525">  177</a></span>&#160;<span class="keywordtype">double</span> <a class="code" href="class_token.html#a56e59f6ff2f7ad073d0456f314c3f525">Token::getAbsoluteGenerationTime</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_token.html#ae1697de3383688ddbe8196cb392bf2ac">absoluteGenerationTime</a>;</div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;}</div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;</div>
<div class="line"><a name="l00186"></a><span class="lineno"><a class="line" href="class_token.html#ae9a6cefbb86e8fdf95cb26abc2db3f72">  186</a></span>&#160;std::vector&lt;std::shared_ptr&lt;Entity&gt;&gt; <a class="code" href="class_token.html#ae9a6cefbb86e8fdf95cb26abc2db3f72">Token::getExplicitRoute</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_token.html#a8f73b3dffa8f905bdccb45abbf19aca6">route</a>.<a class="code" href="class_route.html#a0f045eb09f6f8cd861eec4a6a2ab6162">getExplicitRoute</a>();</div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;}</div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;</div>
<div class="line"><a name="l00195"></a><span class="lineno"><a class="line" href="class_token.html#a37005881ac49bf1895a635836ae276bb">  195</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="class_token.html#a37005881ac49bf1895a635836ae276bb">Token::isRouteBeingRecorded</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_token.html#af5c30f0a60ca47f772e51d06bf8a54c3">recordThisRoute</a>;</div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;}</div>
<div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;</div>
<div class="line"><a name="l00204"></a><span class="lineno"><a class="line" href="class_token.html#aac76ff85d0a523ec84dc4f4d3c106f94">  204</a></span>&#160;std::vector&lt;std::shared_ptr&lt;Entity&gt;&gt; <a class="code" href="class_token.html#aac76ff85d0a523ec84dc4f4d3c106f94">Token::getRecordedRoute</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_token.html#a8f73b3dffa8f905bdccb45abbf19aca6">route</a>.<a class="code" href="class_route.html#a423fa64c12ce8c6a3814f88e78fdf713">getRecordedRoute</a>();</div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;}</div>
<div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;</div>
<div class="line"><a name="l00211"></a><span class="lineno"><a class="line" href="class_token.html#a8cbb080826adf0f03045d6f9a89a1b66">  211</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_token.html#a8cbb080826adf0f03045d6f9a89a1b66">Token::setRecordThisRoute</a>() {</div>
<div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;    <a class="code" href="class_token.html#af5c30f0a60ca47f772e51d06bf8a54c3">recordThisRoute</a> = <span class="keyword">true</span>;</div>
<div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;}</div>
<div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;</div>
<div class="line"><a name="l00218"></a><span class="lineno"><a class="line" href="class_token.html#a44dcd55816044e0c88d71612a186987f">  218</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_token.html#a44dcd55816044e0c88d71612a186987f">Token::setDoNotRecordThisRoute</a>() {</div>
<div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;    <a class="code" href="class_token.html#af5c30f0a60ca47f772e51d06bf8a54c3">recordThisRoute</a> = <span class="keyword">false</span>;</div>
<div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;}</div>
<div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;</div>
<div class="line"><a name="l00231"></a><span class="lineno"><a class="line" href="class_token.html#af2f0a14dbaf5044c7712dbfbf53803eb">  231</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_token.html#af2f0a14dbaf5044c7712dbfbf53803eb">Token::addHopToRecordedRoute</a>(std::shared_ptr&lt;Entity&gt; hop) {</div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="class_token.html#af5c30f0a60ca47f772e51d06bf8a54c3">recordThisRoute</a>) {</div>
<div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;        <span class="comment">// Flag is true; include hop in recorded route vector.</span></div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;        <a class="code" href="class_token.html#a8f73b3dffa8f905bdccb45abbf19aca6">route</a>.<a class="code" href="class_route.html#a4fb075c7ea3e111c16bfd5222fa5074c">addHopToRecordedRoute</a>(hop);</div>
<div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;    } <span class="comment">// If flag is false, do nothing.</span></div>
<div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;}</div>
<div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;</div>
<div class="line"><a name="l00248"></a><span class="lineno"><a class="line" href="class_token.html#a006cf6391fcded1571a375fdf9748918">  248</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_token.html#a006cf6391fcded1571a375fdf9748918">Token::updateHopsFromExplicitRoute</a>(std::shared_ptr&lt;Entity&gt; currentHop) {</div>
<div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;    <span class="comment">// If the currentHop and the nextHop are the same, this might indicate that the token has reached its destination OR</span></div>
<div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;    <span class="comment">// that the token is at its source, and the explicit route has the source at the beginning. Treat this here or at a Node class?</span></div>
<div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;    <span class="comment">// In this case, after updating, previous and next will have the same value (and possibly destination too).</span></div>
<div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;    this-&gt;<a class="code" href="class_token.html#a1647ede32e4d927f836a0f58342d77b2">previous</a> = currentHop;</div>
<div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;    <span class="comment">// Notice that route is not recorded here. The Node class should call the function to add hop to route upon arrival of a token.</span></div>
<div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;    <span class="comment">// Fetch the next hop from Route object attached to token. If it is nullptr, then there is no route. Must treat this in caller.</span></div>
<div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;    this-&gt;<a class="code" href="class_token.html#afc3016125b848c7e88fc5dc8510762ef">next</a> = <a class="code" href="class_token.html#a8f73b3dffa8f905bdccb45abbf19aca6">route</a>.<a class="code" href="class_route.html#a7c1ae064ef11575ae6d75feebadb8777">getNextHopFromExplicitRoute</a>();</div>
<div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;}</div>
<div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;</div>
<div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;<span class="comment">//</span></div>
<div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;<span class="comment"></span><span class="comment">// * Copy constructor.</span></div>
<div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;<span class="comment">// * </span></div>
<div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;<span class="comment">// * @param source Token object that will be copied.</span></div>
<div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;<span class="comment">// */</span></div>
<div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;<span class="comment">//Token::Token(const Token &amp;source): id(source.id), priority(source.priority), entity(source.entity) {</span></div>
<div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;<span class="comment">//}</span></div>
<div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;<span class="comment">//</span></div>
<div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;<span class="comment"></span><span class="comment">// * Move constructor.</span></div>
<div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;<span class="comment">// *</span></div>
<div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;<span class="comment">// * @details </span></div>
<div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;<span class="comment">// * This is used per The Big Three Rule, or The Four or Five Rule (http://stackoverflow.com/questions/4172722/what-is-the-rule-of-three).</span></div>
<div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;<span class="comment">// *</span></div>
<div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;<span class="comment">// * @param source The &quot;source&quot; Token object that will have its resources moved to the current object. The &quot;source&quot; object will likely be destroyed afterwards.</span></div>
<div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;<span class="comment">// */</span></div>
<div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;<span class="comment">//Token::Token(Token &amp;&amp;source): id(0), priority(0), entity(Message()) { // We use a dummy Entity object here (the Message) just to initialize the reference to Entity object.</span></div>
<div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;<span class="comment">//  swap(*this, source);</span></div>
<div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;<span class="comment">//}</span></div>
<div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;<span class="comment">//</span></div>
<div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;<span class="comment"></span><span class="comment">// * Operator = (assignment) overloading.</span></div>
<div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;<span class="comment">// *</span></div>
<div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;<span class="comment">// * @details </span></div>
<div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;<span class="comment">// * This is the overloading of the assignment operator for use with token.</span></div>
<div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;<span class="comment">// * Necessary because a member of the Token class is a reference (&amp;entity).</span></div>
<div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;<span class="comment">// * This is used per The Big Three Rule, or The Four or Five Rule (http://stackoverflow.com/questions/4172722/what-is-the-rule-of-three).</span></div>
<div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;<span class="comment">// * </span></div>
<div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;<span class="comment">// * @param right The Token object to the right of the assignment operator.</span></div>
<div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;<span class="comment">// */</span></div>
<div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;<span class="comment">//Token &amp;Token::operator=(Token right) { // rhs as in Right Hand Side.</span></div>
<div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;<span class="comment">//  swap(*this, right);</span></div>
<div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;<span class="comment">//  return *this;</span></div>
<div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;<span class="comment">//}</span></div>
<div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;<span class="comment">//</span></div>
<div class="line"><a name="l00308"></a><span class="lineno"><a class="line" href="_token_8cpp.html#a2f9ac044b605d23a98ae473993b15f22">  308</a></span>&#160;<span class="comment"></span><span class="keywordtype">bool</span> <a class="code" href="_event_8cpp.html#a33b5ef8ac3e21f9d655b1db577e0e69e">operator==</a>(<span class="keyword">const</span> <a class="code" href="class_token.html">Token</a> &amp;left, <span class="keyword">const</span> <a class="code" href="class_token.html">Token</a> &amp;right)  {</div>
<div class="line"><a name="l00309"></a><span class="lineno">  309</span>&#160;    <span class="keywordflow">return</span> (left.<a class="code" href="class_token.html#a29cd5cc1dd308d278737f1bdb293441d">id</a> == right.<a class="code" href="class_token.html#a29cd5cc1dd308d278737f1bdb293441d">id</a> &amp;&amp; left.<a class="code" href="class_token.html#a8125cc8499770f87f3540c81f889e039">priority</a> == right.<a class="code" href="class_token.html#a8125cc8499770f87f3540c81f889e039">priority</a> &amp;&amp; left.<a class="code" href="class_token.html#afefc7a53c3510da4a70ec2a9f15b9dc2">associatedEntity</a> == right.<a class="code" href="class_token.html#afefc7a53c3510da4a70ec2a9f15b9dc2">associatedEntity</a> &amp;&amp;</div>
<div class="line"><a name="l00310"></a><span class="lineno">  310</span>&#160;        left.<a class="code" href="class_token.html#a1647ede32e4d927f836a0f58342d77b2">previous</a> == right.<a class="code" href="class_token.html#a1647ede32e4d927f836a0f58342d77b2">previous</a> &amp;&amp; left.<a class="code" href="class_token.html#afc3016125b848c7e88fc5dc8510762ef">next</a> == right.<a class="code" href="class_token.html#afc3016125b848c7e88fc5dc8510762ef">next</a> &amp;&amp; left.<a class="code" href="class_token.html#afb12b6d97945606e022f63ef6f1057b9">source</a> == right.<a class="code" href="class_token.html#afb12b6d97945606e022f63ef6f1057b9">source</a> &amp;&amp; left.<a class="code" href="class_token.html#adf59bd26155dc10e574ee552065edaa6">destination</a> == right.<a class="code" href="class_token.html#adf59bd26155dc10e574ee552065edaa6">destination</a> &amp;&amp;</div>
<div class="line"><a name="l00311"></a><span class="lineno">  311</span>&#160;        left.<a class="code" href="class_token.html#ae1697de3383688ddbe8196cb392bf2ac">absoluteGenerationTime</a> == right.<a class="code" href="class_token.html#ae1697de3383688ddbe8196cb392bf2ac">absoluteGenerationTime</a>);</div>
<div class="line"><a name="l00312"></a><span class="lineno">  312</span>&#160;}</div>
<div class="line"><a name="l00313"></a><span class="lineno">  313</span>&#160;</div>
<div class="line"><a name="l00331"></a><span class="lineno"><a class="line" href="_token_8cpp.html#a6f52a7ce33f63dc1b326c6c5863bb670">  331</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="_event_8cpp.html#afb11938c92f98ab02bea1ebfd9de42a0">operator!=</a>(<span class="keyword">const</span> <a class="code" href="class_token.html">Token</a> &amp;left, <span class="keyword">const</span> <a class="code" href="class_token.html">Token</a> &amp;right)  {</div>
<div class="line"><a name="l00332"></a><span class="lineno">  332</span>&#160;    <span class="keywordflow">return</span> !<a class="code" href="_event_8cpp.html#a33b5ef8ac3e21f9d655b1db577e0e69e">operator==</a>(left, right);</div>
<div class="line"><a name="l00333"></a><span class="lineno">  333</span>&#160;}</div>
<div class="line"><a name="l00334"></a><span class="lineno">  334</span>&#160;</div>
<div class="line"><a name="l00335"></a><span class="lineno">  335</span>&#160;<span class="comment">//</span></div>
<div class="line"><a name="l00337"></a><span class="lineno">  337</span>&#160;<span class="comment"></span><span class="comment">// * Swap function</span></div>
<div class="line"><a name="l00338"></a><span class="lineno">  338</span>&#160;<span class="comment">// *</span></div>
<div class="line"><a name="l00339"></a><span class="lineno">  339</span>&#160;<span class="comment">// * @details </span></div>
<div class="line"><a name="l00340"></a><span class="lineno">  340</span>&#160;<span class="comment">// * This is used per The Big Three Rule, or The Four or Five Rule (http://stackoverflow.com/questions/4172722/what-is-the-rule-of-three).</span></div>
<div class="line"><a name="l00341"></a><span class="lineno">  341</span>&#160;<span class="comment">// * It is an implementation of the Copy-and-Swap idiom.</span></div>
<div class="line"><a name="l00342"></a><span class="lineno">  342</span>&#160;<span class="comment">// *</span></div>
<div class="line"><a name="l00343"></a><span class="lineno">  343</span>&#160;<span class="comment">// * @param left Token object to the left that will be swapped.</span></div>
<div class="line"><a name="l00344"></a><span class="lineno">  344</span>&#160;<span class="comment">// * @param right Token object to the right that will be swapped.</span></div>
<div class="line"><a name="l00345"></a><span class="lineno">  345</span>&#160;<span class="comment">// */</span></div>
<div class="line"><a name="l00346"></a><span class="lineno">  346</span>&#160;<span class="comment">//void swap(Token &amp;left, Token &amp;right) {</span></div>
<div class="line"><a name="l00347"></a><span class="lineno">  347</span>&#160;<span class="comment">//  std::swap(left.entity, right.entity);</span></div>
<div class="line"><a name="l00348"></a><span class="lineno">  348</span>&#160;<span class="comment">//  std::swap(left.id, right.id);</span></div>
<div class="line"><a name="l00349"></a><span class="lineno">  349</span>&#160;<span class="comment">//  std::swap(left.priority, right.priority);</span></div>
<div class="line"><a name="l00350"></a><span class="lineno">  350</span>&#160;<span class="comment">//  // Now right is left, and left is right.</span></div>
<div class="line"><a name="l00351"></a><span class="lineno">  351</span>&#160;<span class="comment">//}</span></div>
<div class="ttc" id="class_token_html_a1647ede32e4d927f836a0f58342d77b2"><div class="ttname"><a href="class_token.html#a1647ede32e4d927f836a0f58342d77b2">Token::previous</a></div><div class="ttdeci">std::shared_ptr&lt; Entity &gt; previous</div><div class="ttdoc">Previous entity that had this token (for token routing). </div><div class="ttdef"><b>Definition:</b> <a href="_token_8h_source.html#l00056">Token.h:56</a></div></div>
<div class="ttc" id="class_token_html_afefc7a53c3510da4a70ec2a9f15b9dc2"><div class="ttname"><a href="class_token.html#afefc7a53c3510da4a70ec2a9f15b9dc2">Token::associatedEntity</a></div><div class="ttdeci">std::shared_ptr&lt; Entity &gt; associatedEntity</div><div class="ttdoc">Reference to associated Entity object (typically another child of Entity class). </div><div class="ttdef"><b>Definition:</b> <a href="_token_8h_source.html#l00055">Token.h:55</a></div></div>
<div class="ttc" id="class_token_html_ae9a6cefbb86e8fdf95cb26abc2db3f72"><div class="ttname"><a href="class_token.html#ae9a6cefbb86e8fdf95cb26abc2db3f72">Token::getExplicitRoute</a></div><div class="ttdeci">virtual std::vector&lt; std::shared_ptr&lt; Entity &gt; &gt; getExplicitRoute() const </div><div class="ttdoc">Get explicit route. </div><div class="ttdef"><b>Definition:</b> <a href="_token_8cpp_source.html#l00186">Token.cpp:186</a></div></div>
<div class="ttc" id="class_token_html_afc3016125b848c7e88fc5dc8510762ef"><div class="ttname"><a href="class_token.html#afc3016125b848c7e88fc5dc8510762ef">Token::next</a></div><div class="ttdeci">std::shared_ptr&lt; Entity &gt; next</div><div class="ttdoc">Next entity that will have to process this token (to which entity the token has to be &amp;quot;sent&amp;quot;...</div><div class="ttdef"><b>Definition:</b> <a href="_token_8h_source.html#l00057">Token.h:57</a></div></div>
<div class="ttc" id="class_simulator_globals_html_a139c8820dedfd73eb81e6ded58c0c792"><div class="ttname"><a href="class_simulator_globals.html#a139c8820dedfd73eb81e6ded58c0c792">SimulatorGlobals::getTokenNextId</a></div><div class="ttdeci">unsigned int getTokenNextId()</div><div class="ttdef"><b>Definition:</b> <a href="_simulator_globals_8cpp_source.html#l00171">SimulatorGlobals.cpp:171</a></div></div>
<div class="ttc" id="_event_8cpp_html_afb11938c92f98ab02bea1ebfd9de42a0"><div class="ttname"><a href="_event_8cpp.html#afb11938c92f98ab02bea1ebfd9de42a0">operator!=</a></div><div class="ttdeci">bool operator!=(const Event &amp;left, const Event &amp;right)</div><div class="ttdef"><b>Definition:</b> <a href="_event_8cpp_source.html#l00065">Event.cpp:65</a></div></div>
<div class="ttc" id="class_route_html"><div class="ttname"><a href="class_route.html">Route</a></div><div class="ttdoc">Route class. </div><div class="ttdef"><b>Definition:</b> <a href="_route_8h_source.html#l00035">Route.h:35</a></div></div>
<div class="ttc" id="class_token_html_a56e59f6ff2f7ad073d0456f314c3f525"><div class="ttname"><a href="class_token.html#a56e59f6ff2f7ad073d0456f314c3f525">Token::getAbsoluteGenerationTime</a></div><div class="ttdeci">virtual double getAbsoluteGenerationTime() const </div><div class="ttdoc">Gets the (reference to) route attached to token. </div><div class="ttdef"><b>Definition:</b> <a href="_token_8cpp_source.html#l00177">Token.cpp:177</a></div></div>
<div class="ttc" id="class_token_html_ae1697de3383688ddbe8196cb392bf2ac"><div class="ttname"><a href="class_token.html#ae1697de3383688ddbe8196cb392bf2ac">Token::absoluteGenerationTime</a></div><div class="ttdeci">double absoluteGenerationTime</div><div class="ttdoc">Absolute generation timestamp for this token (i.e., the clock time this token was generated)...</div><div class="ttdef"><b>Definition:</b> <a href="_token_8h_source.html#l00047">Token.h:47</a></div></div>
<div class="ttc" id="class_token_html_afb12b6d97945606e022f63ef6f1057b9"><div class="ttname"><a href="class_token.html#afb12b6d97945606e022f63ef6f1057b9">Token::source</a></div><div class="ttdeci">std::shared_ptr&lt; Entity &gt; source</div><div class="ttdoc">Source entity of this token. </div><div class="ttdef"><b>Definition:</b> <a href="_token_8h_source.html#l00058">Token.h:58</a></div></div>
<div class="ttc" id="class_route_html_a423fa64c12ce8c6a3814f88e78fdf713"><div class="ttname"><a href="class_route.html#a423fa64c12ce8c6a3814f88e78fdf713">Route::getRecordedRoute</a></div><div class="ttdeci">std::vector&lt; std::shared_ptr&lt; Entity &gt; &gt; getRecordedRoute() const </div><div class="ttdoc">Get value of flag recordThisRoute. </div><div class="ttdef"><b>Definition:</b> <a href="_route_8cpp_source.html#l00062">Route.cpp:62</a></div></div>
<div class="ttc" id="class_token_html"><div class="ttname"><a href="class_token.html">Token</a></div><div class="ttdoc">Token class. </div><div class="ttdef"><b>Definition:</b> <a href="_token_8h_source.html#l00044">Token.h:44</a></div></div>
<div class="ttc" id="class_token_html_af2f0a14dbaf5044c7712dbfbf53803eb"><div class="ttname"><a href="class_token.html#af2f0a14dbaf5044c7712dbfbf53803eb">Token::addHopToRecordedRoute</a></div><div class="ttdeci">virtual void addHopToRecordedRoute(std::shared_ptr&lt; Entity &gt; hop)</div><div class="ttdoc">Record hop within recorded route, if flag is set. </div><div class="ttdef"><b>Definition:</b> <a href="_token_8cpp_source.html#l00231">Token.cpp:231</a></div></div>
<div class="ttc" id="class_token_html_af5c30f0a60ca47f772e51d06bf8a54c3"><div class="ttname"><a href="class_token.html#af5c30f0a60ca47f772e51d06bf8a54c3">Token::recordThisRoute</a></div><div class="ttdeci">bool recordThisRoute</div><div class="ttdoc">True: route followed by token/PDU must be recorded. False: do not record route followed by token/PDU...</div><div class="ttdef"><b>Definition:</b> <a href="_token_8h_source.html#l00048">Token.h:48</a></div></div>
<div class="ttc" id="class_token_html_a8bf8338e7e065f2a13a51fd7286ec994"><div class="ttname"><a href="class_token.html#a8bf8338e7e065f2a13a51fd7286ec994">Token::Token</a></div><div class="ttdeci">Token(unsigned int id, int priority, std::shared_ptr&lt; Entity &gt; associatedEntity, std::shared_ptr&lt; Entity &gt; source, std::shared_ptr&lt; Entity &gt; destination)</div><div class="ttdoc">Constructor with parameters, but previous and next. </div><div class="ttdef"><b>Definition:</b> <a href="_token_8cpp_source.html#l00034">Token.cpp:34</a></div></div>
<div class="ttc" id="class_route_html_a0f045eb09f6f8cd861eec4a6a2ab6162"><div class="ttname"><a href="class_route.html#a0f045eb09f6f8cd861eec4a6a2ab6162">Route::getExplicitRoute</a></div><div class="ttdeci">std::vector&lt; std::shared_ptr&lt; Entity &gt; &gt; getExplicitRoute() const </div><div class="ttdoc">Get explicit route. </div><div class="ttdef"><b>Definition:</b> <a href="_route_8cpp_source.html#l00044">Route.cpp:44</a></div></div>
<div class="ttc" id="_token_8h_html_a17a408125f68aec488770e77e17f70ea"><div class="ttname"><a href="_token_8h.html#a17a408125f68aec488770e77e17f70ea">DEFAULT_GENERATION_TIME</a></div><div class="ttdeci">#define DEFAULT_GENERATION_TIME</div><div class="ttdef"><b>Definition:</b> <a href="_token_8h_source.html#l00028">Token.h:28</a></div></div>
<div class="ttc" id="class_simulator_globals_html_a08da82e86d7c26d8f2498bd313f0e66e"><div class="ttname"><a href="class_simulator_globals.html#a08da82e86d7c26d8f2498bd313f0e66e">SimulatorGlobals::getCurrentAbsoluteTime</a></div><div class="ttdeci">double getCurrentAbsoluteTime() const </div><div class="ttdef"><b>Definition:</b> <a href="_simulator_globals_8cpp_source.html#l00070">SimulatorGlobals.cpp:70</a></div></div>
<div class="ttc" id="class_token_html_a44dcd55816044e0c88d71612a186987f"><div class="ttname"><a href="class_token.html#a44dcd55816044e0c88d71612a186987f">Token::setDoNotRecordThisRoute</a></div><div class="ttdeci">virtual void setDoNotRecordThisRoute()</div><div class="ttdoc">Unset flag to record the route followed by token (set to FALSE). </div><div class="ttdef"><b>Definition:</b> <a href="_token_8cpp_source.html#l00218">Token.cpp:218</a></div></div>
<div class="ttc" id="class_route_html_a7c1ae064ef11575ae6d75feebadb8777"><div class="ttname"><a href="class_route.html#a7c1ae064ef11575ae6d75feebadb8777">Route::getNextHopFromExplicitRoute</a></div><div class="ttdeci">std::shared_ptr&lt; Entity &gt; getNextHopFromExplicitRoute()</div><div class="ttdoc">Gets the next hop from the explicit route vector. </div><div class="ttdef"><b>Definition:</b> <a href="_route_8cpp_source.html#l00114">Route.cpp:114</a></div></div>
<div class="ttc" id="class_token_html_a8cbb080826adf0f03045d6f9a89a1b66"><div class="ttname"><a href="class_token.html#a8cbb080826adf0f03045d6f9a89a1b66">Token::setRecordThisRoute</a></div><div class="ttdeci">virtual void setRecordThisRoute()</div><div class="ttdoc">Set flag to record the route followed by token to TRUE. </div><div class="ttdef"><b>Definition:</b> <a href="_token_8cpp_source.html#l00211">Token.cpp:211</a></div></div>
<div class="ttc" id="class_token_html_a1251a6a9395ed89aac82e88f4c110335"><div class="ttname"><a href="class_token.html#a1251a6a9395ed89aac82e88f4c110335">Token::setExplicitRoute</a></div><div class="ttdeci">virtual void setExplicitRoute(std::vector&lt; std::shared_ptr&lt; Entity &gt;&gt; explicitRoute)</div><div class="ttdoc">Set the explicit route for this token and erases previously recorded route. </div><div class="ttdef"><b>Definition:</b> <a href="_token_8cpp_source.html#l00155">Token.cpp:155</a></div></div>
<div class="ttc" id="class_token_html_a37005881ac49bf1895a635836ae276bb"><div class="ttname"><a href="class_token.html#a37005881ac49bf1895a635836ae276bb">Token::isRouteBeingRecorded</a></div><div class="ttdeci">virtual bool isRouteBeingRecorded() const </div><div class="ttdoc">Get value of flag recordThisRoute. </div><div class="ttdef"><b>Definition:</b> <a href="_token_8cpp_source.html#l00195">Token.cpp:195</a></div></div>
<div class="ttc" id="class_simulator_globals_html"><div class="ttname"><a href="class_simulator_globals.html">SimulatorGlobals</a></div><div class="ttdoc">Simulator-scope variables and parameters. </div><div class="ttdef"><b>Definition:</b> <a href="_simulator_globals_8h_source.html#l00158">SimulatorGlobals.h:158</a></div></div>
<div class="ttc" id="class_route_html_a4fb075c7ea3e111c16bfd5222fa5074c"><div class="ttname"><a href="class_route.html#a4fb075c7ea3e111c16bfd5222fa5074c">Route::addHopToRecordedRoute</a></div><div class="ttdeci">void addHopToRecordedRoute(std::shared_ptr&lt; Entity &gt; hop)</div><div class="ttdoc">Set flag to record the route followed by token to TRUE. </div><div class="ttdef"><b>Definition:</b> <a href="_route_8cpp_source.html#l00099">Route.cpp:99</a></div></div>
<div class="ttc" id="class_token_html_a006cf6391fcded1571a375fdf9748918"><div class="ttname"><a href="class_token.html#a006cf6391fcded1571a375fdf9748918">Token::updateHopsFromExplicitRoute</a></div><div class="ttdeci">virtual void updateHopsFromExplicitRoute(std::shared_ptr&lt; Entity &gt; currentHop)</div><div class="ttdoc">Update previous/next hops from the explicit route vector to prepare the token to be forwarded within ...</div><div class="ttdef"><b>Definition:</b> <a href="_token_8cpp_source.html#l00248">Token.cpp:248</a></div></div>
<div class="ttc" id="class_token_html_adf59bd26155dc10e574ee552065edaa6"><div class="ttname"><a href="class_token.html#adf59bd26155dc10e574ee552065edaa6">Token::destination</a></div><div class="ttdeci">std::shared_ptr&lt; Entity &gt; destination</div><div class="ttdoc">Destination entity of this token. </div><div class="ttdef"><b>Definition:</b> <a href="_token_8h_source.html#l00059">Token.h:59</a></div></div>
<div class="ttc" id="class_token_html_a3d7d59eaac1535df1433357d5d372f84"><div class="ttname"><a href="class_token.html#a3d7d59eaac1535df1433357d5d372f84">Token::~Token</a></div><div class="ttdeci">~Token()</div><div class="ttdef"><b>Definition:</b> <a href="_token_8cpp_source.html#l00142">Token.cpp:142</a></div></div>
<div class="ttc" id="_event_8cpp_html_a33b5ef8ac3e21f9d655b1db577e0e69e"><div class="ttname"><a href="_event_8cpp.html#a33b5ef8ac3e21f9d655b1db577e0e69e">operator==</a></div><div class="ttdeci">bool operator==(const Event &amp;left, const Event &amp;right)</div><div class="ttdef"><b>Definition:</b> <a href="_event_8cpp_source.html#l00048">Event.cpp:48</a></div></div>
<div class="ttc" id="class_token_html_a29cd5cc1dd308d278737f1bdb293441d"><div class="ttname"><a href="class_token.html#a29cd5cc1dd308d278737f1bdb293441d">Token::id</a></div><div class="ttdeci">unsigned int id</div><div class="ttdoc">Token unique ID. </div><div class="ttdef"><b>Definition:</b> <a href="_token_8h_source.html#l00051">Token.h:51</a></div></div>
<div class="ttc" id="_token_8h_html"><div class="ttname"><a href="_token_8h.html">Token.h</a></div></div>
<div class="ttc" id="class_token_html_a8f73b3dffa8f905bdccb45abbf19aca6"><div class="ttname"><a href="class_token.html#a8f73b3dffa8f905bdccb45abbf19aca6">Token::route</a></div><div class="ttdeci">Route route</div><div class="ttdoc">Route object to provide explicit routing for the token, or to record followed routes. </div><div class="ttdef"><b>Definition:</b> <a href="_token_8h_source.html#l00046">Token.h:46</a></div></div>
<div class="ttc" id="class_token_html_aac76ff85d0a523ec84dc4f4d3c106f94"><div class="ttname"><a href="class_token.html#aac76ff85d0a523ec84dc4f4d3c106f94">Token::getRecordedRoute</a></div><div class="ttdeci">virtual std::vector&lt; std::shared_ptr&lt; Entity &gt; &gt; getRecordedRoute() const </div><div class="ttdoc">Get recorded route so far. </div><div class="ttdef"><b>Definition:</b> <a href="_token_8cpp_source.html#l00204">Token.cpp:204</a></div></div>
<div class="ttc" id="class_token_html_a8125cc8499770f87f3540c81f889e039"><div class="ttname"><a href="class_token.html#a8125cc8499770f87f3540c81f889e039">Token::priority</a></div><div class="ttdeci">int priority</div><div class="ttdoc">Token priority. Higher priority, higher number. </div><div class="ttdef"><b>Definition:</b> <a href="_token_8h_source.html#l00052">Token.h:52</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Mon Jan 6 2014 12:30:37 for QCNSim by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.5
</small></address>
</body>
</html>
